﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PresentItNow
{
    /// <summary>
    /// Interaction logic for MarkerWindow.xaml
    /// </summary>
    public partial class MarkerWindow : Window
    {
        public MarkerWindow()
        {
            InitializeComponent();        
            //tbName.Text = DataStore.Name;
        }

        public MarkerWindow(string Name, int colorNumber)
        {
            InitializeComponent();
            tbName.Text = Name;

            ellipse.Stroke = GetBrush(colorNumber);
            tbName.Foreground = GetBrush(colorNumber);
        }

        private SolidColorBrush GetBrush(int colorNumber)
        {
            int residue = colorNumber % 4;
            if (residue == 0)
            {
                return new SolidColorBrush(Colors.Blue);
            }
            else if (residue == 1)
            {
                return new SolidColorBrush(Colors.Red);
            }
            else if (residue == 2)
            {
                return new SolidColorBrush(Colors.Green);
            }

            else if (residue == 3)
            {
                return new SolidColorBrush(Colors.Magenta);
            }
            return null;
        }
    }
}
